package aliyunapi

import (
	cloudaliyunapi "gitee.com/bitwormhole/cloud-aliyun-api"
	"gitee.com/bitwormhole/cloud-aliyun-api/gen/main4aliyunapi"
	"gitee.com/bitwormhole/cloud-aliyun-api/gen/test4aliyunapi"
	"github.com/starter-go/application"
	"github.com/starter-go/httpagent/modules/httpagent"
)

// Module  ...
func Module() application.Module {
	mb := cloudaliyunapi.NewMainModule()
	mb.Components(main4aliyunapi.ExportComponents)

	// mb.Depend(libgin.Module())
	// mb.Depend(libgorm.Module())
	// mb.Depend(security.Module())

	// mb.Depend(mysql.Module())
	// mb.Depend(sqlserver.Module())

	mb.Depend(httpagent.Module())

	return mb.Create()
}

// ModuleForTest ...
func ModuleForTest() application.Module {
	mb := cloudaliyunapi.NewTestModule()
	mb.Components(test4aliyunapi.ExportComponents)

	mb.Depend(Module())

	return mb.Create()
}
